all: report clean

report: src/CMakeLists.txt doc/hzx.gp src/step-3.cc
	cd src && cmake . && make &&./step-3 && mv solution.gpl ..
	mv solution.gpl doc
	cd doc;gnuplot hzx.gp;xelatex final.tex;bibtex  final.aux;\
	xelatex final.tex;xelatex final.tex
clean:
	cd doc && rm -f *.aux *.bbl *.blg *.log *.toc *.eps *.gpl *.out *.snm *.dat *.nav
	cd src && rm -f CMakeCache.txt cmake_install.cmake Makefile step-3 && rm -rf CMakeFiles
